<?php if (!defined('BASEPATH')) exit('No direct script access allowed.');?> 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" " http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns=" http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>找回密码 - Panli代购</title>
    <link href="/mysite/images/forgotPassword.css" rel="stylesheet" type="text/css">
    <script src="/mysite/js/jquery-1.3.2.min.js" type="text/javascript"></script>
    <script type="text/javascript">
        function success(dom) { 
		   $(dom).attr("class", "").next("p").attr("class", "").html('<img src="/mysite/images/gou.gif" />'); 
		}

        function reCheckPassword(dom) {
            var rePass = $.trim($(dom).val());
            if (rePass.length <= 0) {
                $(dom).attr("class", "").next("p").attr("class", "").text("请再次输入您的密码");
            } else {
                if ($.trim($("#FPassword").val()) == rePass) { success(dom); }
                else { $(dom).attr("class", "wrong").next("p").attr("class", "red").text("两次密码输入不一致，请重新输入"); }
            }
        }

        function checkPassword(dom) {
            var pass = $.trim($(dom).val());
            if (pass.length <= 0) { $(dom).attr("class", "").val(""); }
            else {
                var regtest = new RegExp("^(\\w)*$");
                if (regtest.test(pass)) {
                    var regEng = new RegExp("\\w", "g");
                    var passLength = 0;
                    var res;
                    while ((res = regEng.exec(pass)) != null)
                        passLength++;

                    if (passLength <= 20 && passLength >= 6) {
                        success(dom);
                        if ($("#FPassword").val().length > 0) { reCheckPassword("#RePassword"); }
                    }
                    else { $(dom).attr("class", "wrong").next("p").attr("class", "red").text("密码长度必须是6-20个字符"); }
                }
                else { $(dom).attr("class", "wrong").next("p").attr("class", "red").text("密码必须是大小写英文字母、数字组成、长度为6-20个字符"); }
            }
        }

        function changePasswordSubmit() {
            if ($("#FPassword").val().length <= 0) { $("#FPassword").attr("class", "wrong").next("p").attr("class", "red").text("请输入密码"); return; }
            if ($("#RePassword").val().length <= 0) { $("#RePassword").attr("class", "wrong").next("p").attr("class", "red").text("请输入确认密码"); return; }
            checkPassword("#FPassword"); reCheckPassword("#RePassword");
            if ($("input[class='wrong']").length <= 0) document.forms[0].submit();
        }
    </script>
    <script type="text/javascript" src="chrome-extension://dlnembnfbcpjnepmfjmngjenhhajpdfd/resources/LocalScript.js"></script>
	<script type="text/javascript" src="chrome-extension://dlnembnfbcpjnepmfjmngjenhhajpdfd/libraries/DataExchangeScript.js"></script>
    </head>
    <body onload="$('#FPassword').focus();">
<form name="ctl00" method="post" action="<?php echo LOGIN_PAGE('/changenewpassword'); ?>" id="ctl00">
      <div>
    <input type="hidden" name="userid" id="id" value="<?php echo $md5_userid; ?>">
  </div>
      <div class="top">
    <div class="logo"> <a href="http://www.panli.com/"> <img src="/mysite/images/logo.gif" alt="Panli代购"></a></div>
    <div class="hy"> <img src="/mysite/images/hy_zh.gif" alt="找回密码"> </div>
    <div class="T_right"> <a href="http://www.panli.com/">返回首页</a><span>|</span><a href="http://www.panli.com/Help/">帮助信息</a> </div>
  </div>
      <div class="center">
    <div class="bz"> <img src="/mysite/images/move_b3.gif" alt="请输入新密码"> </div>
    <div class="xiugai bz3">
          <div class="gongxi"> 恭喜您确认成功！请在两小时内输入您的新密码！</div>
          <table>
        <tbody>
              <tr>
            <td class="z"> 设定新密码： </td>
            <td><input id="FPassword" class="" name="FPassword" type="password" onblur="checkPassword(this)" onfocus="this.className=&#39;on&#39;;$(this).next(&#39;p&#39;).attr(&#39;class&#39;,&#39;&#39;).html(&#39;密码可由大小写英文字母、数字组成，长度为６-２０个字符&#39;);">
                  <p> 密码可由大小写英文字母、数字组成，长度为６-２０个字符</p></td>
          </tr>
              <tr>
            <td class="z"> 确认新密码： </td>
            <td><input name="RePassword" type="password" id="RePassword" onblur="reCheckPassword(this)" onfocus="this.className=&#39;on&#39;;$(this).next(&#39;p&#39;).attr(&#39;class&#39;,&#39;&#39;).html(&#39;请再次输入您的密码&#39;);">
                  <p> 请再次输入您的密码</p></td>
          </tr>
            </tbody>
      </table>
          <div class="tijiao">
        <input class="button" onclick="changePasswordSubmit()" name="" type="button" value="确认修改" onmouseover="this.className=&#39;button_&#39;" onmouseout="this.className=&#39;button&#39;">
      </div>
        </div>
    <div class="yj"> </div>
  </div>
      <div class="foot">
    <p> <a href="http://hr.panli.com/" target="_blank">关于Panli</a>&nbsp;|&nbsp;<a href="http://www.panli.com/news/about.aspx?nid=5">联系我们</a>&nbsp;|&nbsp;<a href="http://hr.panli.com/job_index.aspx" target="_blank">加入Panli</a><span>&nbsp;|&nbsp;<a href="http://www.panli.com/news/about.aspx?nid=14">友情链接</a></span></p>
    Copyright ©2012 Panli All rights reserved</div>
    </form>
</body>
</html>